﻿using NewsPortal.Web.Infrastructure.Modularity;
using NewsPortal.Web.Infrastructure.Modularity.ModuleControllerFactory;
using StructureMap;

namespace NewsPortal.Web.Infrastructure.AppEvents.Application_Start
{
    public class GetModules : IAppEventHandler
    {
        public AppEventType EventType
        {
            get { return AppEventType.Application_Start; }
        }

        public void Execute()
        {
            GlobalModuleCollection.Populate();
            GlobalModuleControllerCollection.Populate(new ModuleControllerFactory());
        }
    }
}